﻿using System;

using NUnit.Framework;
using Spring.Testing.NUnit;

using VisualAgile.Model;
using VisualAgile.IDAL;

namespace VisualAgile.DAL.Tests
{
    [TestFixture]
    public class ActualDaoTest : AbstractTransactionalDbProviderSpringContextTests
    {
        protected override string[] ConfigLocations
        {
            get
            {
                return new String[] { "objects.xml" };
            }
        }

        protected IActualsDao ActualsDao
        {
            get
            {
                return applicationContext.GetObject("ActualsDao") as IActualsDao;
            }
        }

        [Test]
        public void SaveActualTest()
        {
            Actual actual = new Actual();            
            
            actual.CreateTime = DateTime.Now;            
            actual.Remain = 10.0;

            ActualsDao.Save(actual);
            transactionManager.Commit(transactionStatus);
        }       
    }
}
